import request from "@/utils/request";
import {AesMain} from "@/utils/AesHmacMD5"

// 查询项目列表
export function listType(query) {
    return request({
        url: "/admin/process/approval/list/",
        method: "post",
        data: AesMain(query)
    });
}

// 新增项目
export function addType(query) {
    return request({
        url: "/admin/process/approval/add/",
        method: "post",
        data: AesMain(query)
    });
}

// 新增项目---校验【项目名称不能重复】
export function uniqueType(valName) {
    return request({
        url: "/admin/process/approval/unique/" + valName,
        method: "get"
    });
}

// 修改回显
export function updateShowType(processId) {
    return request({
        url: "/admin/process/approval/updateShow/" + processId,
        method: "get"
    });
}

// 删除项目列表
export function delType(processId) {
    return request({
        url: "/admin/process/approval/delete/" + processId,
        method: "delete"
    });
}

// 修改回显
export function processType(processId) {
    return request({
        url: "/admin/process/approval/dictProcess/",
        method: "get"
    });
}

// 读取所有数据---项目数，模板数，文件数
export function getAllData() {
    return request({
        url: "/admin/process/approval/getAllData/",
        method: "get"
    });
}

// 测试
export function ceshiType(processId) {
    return request({
        url: "/admin/process/ceshi/",
        method: "post"
    });
}